<?php	
if($user->access==2){
?>
<div id="admin_send_email">
	<form action="indexpopup.php?page=admin_send_email" method="post">
		<table>
		<caption>Send Email</caption>
		<tr>
			<td>Destinataire* :</td>
			<td>
				<select size="10" multiple="multiple" name="email_dest[]">
<?php 
	$q=mysql_query("SELECT login,email FROM ".DATABASE_TABLE_USER." ");
	while($query=mysql_fetch_array($q)){
?>
					<option><?php print $query['login']; ?></option>
<?php 
	}
?>
				</select>
			</td>
		</tr>
		<tr>
			<td>Object :</td>
			<td><input type="text" name="email_object" /></td>
		</tr>
		<tr>
			<td colspan="2"><textarea rows="3" cols="50" name="email_message"></textarea></td>
		</tr>
		<tr>
			<td></td>
			<td>
				<input type="hidden" name="hidden" value="email_send" />
				<input type="submit" value="send" />
				<input type="button" value="exit" onclick="reload_page('admin');" />
			</td>
		</tr>
		</table>
	</form>
</div>
<?php	
}
?>